package cn.getech.data.development.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 数据探索
 * </p>
 *
 * @author zenith
 * @since 2019-07-08
 */
@Data
@TableName("bdp_data_explore")
public class DataExplore implements Serializable {

    private static final long serialVersionUID=1L;


    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * sql语句
     */
    @NotBlank(message = "sql语句不可为空")
    @TableField(value = "`sql`")
    private String sql;

    /**
     * 执行的时间
     */
    private Float executeTime;

    /**
     * 提交时间
     */
    private Date createTime;

    /**
     * 提交人id
     */
    private Integer createPer;

    /**
     * 结果表名称
     */
    @TableField(value = "result_table_name")
    private String resultTableName;

    /**
     * 相关表的名称
     */
    @TableField(value = "relation_table_name")
    private String relationTableName;

    private Integer state;
    @TableField(exist=false)
    private String stateName;
    private String msg;
    /**
     * 存储引擎  1 hive 2 kudu
     */
    @TableField(value = "search_engine")
    private Integer  searchEngine;

}
